package com.sxmmall.product.feign;


import com.sxmmall.common.to.SkuReductionTo;
import com.sxmmall.common.to.SpuBoundsTo;
import com.sxmmall.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("sxmmall-coupon")
public interface CouponFeignService {

    /**
     * 请求地址完全一致
     * RequestBody 把参数 转为json 接受放方只要json的属性相对应就可以通过 json参数转换成对方服务的json参数
     * 只要双方服务的 参数json格式一一对应即可
     * @param spuBoundsTo
     * @return
     */
    @PostMapping("coupon/spubounds/save")
    R saveSpuBounds(@RequestBody SpuBoundsTo spuBoundsTo);

    /*
     * @Author sxm
     * @Description 远程优惠信息接口调用
     * @Date 14:43 2021/9/17
     * @Param [skuReductionTo]
     * @return [com.sxmmall.common.to.SkuReductionTo]
     **/
    @PostMapping("coupon/skufullreduction/saveInfo")
    R saveSkuReduction(@RequestBody SkuReductionTo skuReductionTo);
}
